
#include "Scene.h"

#include <QDebug>

#include <algorithm/shared/data/scene/Air.h>
#include <algorithm/shared/data/scene/Camera.h>
#include <algorithm/shared/data/scene/Cloud.h>
#include <algorithm/shared/data/scene/Heliostat.h>
#include <algorithm/shared/data/scene/Location.h>
#include <algorithm/shared/data/scene/Node.h>
#include <algorithm/shared/data/scene/Ordinary.h>
#include <algorithm/shared/data/scene/Receiver.h>
#include <algorithm/shared/data/scene/Sun.h>
#include <algorithm/shared/data/scene/Terrain.h>
#include <algorithm/shared/utils/Para.h>
#include <ui/tree/ParaTreeViewController.h>
#include <ui/tree/TopoTreeViewController.h>

namespace solar
{

    Scene::Scene()
    {
        para_tree_control_ = QSharedPointer<ParaTreeViewController>(new ParaTreeViewController);
        topo_tree_control_ = QSharedPointer<TopoTreeViewController>(new TopoTreeViewController);

        sun_ = QSharedPointer<Sun>(new Sun);
        location_ = QSharedPointer<Location>(new Location);
        air_ = QSharedPointer<Air>(new Air);
        camera_ = QSharedPointer<Camera>(new Camera);
        terrain_ = QSharedPointer<Terrain>(new Terrain);
        cloud_ = QSharedPointer<Cloud>(new Cloud);

        para_tree_control_->addParaTreeModel(LOCATION, location_);
        para_tree_control_->addParaTreeModel(SUN, sun_);
        para_tree_control_->addParaTreeModel(AIR, air_);
        para_tree_control_->addParaTreeModel(TERRAIN, terrain_);
        para_tree_control_->addParaTreeModel(CAMERA, camera_);
        para_tree_control_->addParaTreeModel(CLOUD, cloud_);

        topo_tree_control_->setParaTreeController(para_tree_control_);
    }
    auto Scene::getSun() -> Sun* { return sun_.get(); }
    auto Scene::getCloud() -> Cloud* { return cloud_.get(); }

} // namespace solar
